Skip to content

#104 add auth to expenditures#137

Open
tsudhakar87 wants to merge 7 commits intomainfrom
104-add-auth-to-expenditures
Open

#104 add auth to expenditures#137
tsudhakar87 wants to merge 7 commits intomainfrom
104-add-auth-to-expenditures

Conversation

@tsudhakar87
Copy link
Contributor

@tsudhakar87 tsudhakar87 commented Feb 19, 2026

ℹ️ Issue

Closes #104

📝 Description

Write a short summary of what you added. Why is it important? Any member of C4C should be able to read this and understand your contribution -- not just your team members.

Briefly list the changes made to the code:

  1. Added auth handling to expenditures (only admins OR PIs/Accountants of projects can create expenditures for a project)
  2. Updated tests for auth checks

✔️ Verification

What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.

Tests appear to be working
unit tests
Screenshot 2026-02-19 at 11 27 38 AM

e2e tests
Screenshot 2026-02-19 at 4 15 05 PM

🏕️ (Optional) Future Work / Notes

Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!

@tsudhakar87 tsudhakar87 changed the title 104 add auth to expenditures #104 add auth to expenditures Feb 19, 2026
.values({
project_id: projectID,
entered_by: enteredBy ?? null,
entered_by: user.userId!,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Authorized users won't be able to create new expenditures on behalf of other users (which seems like how it should be?); entered_by will always be the authorized user's Id

@tsudhakar87 tsudhakar87 marked this pull request as ready for review February 19, 2026 21:21
github-actions bot added a commit that referenced this pull request Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Authentication Check to Expenditures Routes

1 participant

Comments